home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / util / arc / SNESDiz.lha / SNESDiz / Extras / Sneskart.txt next >
Text File  |  1999-01-20  |  35KB  |  1,212 lines

  1.                                SNES Kart v1.6
  2.            The most complete guide to a SNES cartridge worldwide
  3.  
  4.                             .                 .
  5.                               ______ ______ .
  6.                            .:_\_ .  \\_ .__\_::.
  7.                         . .::./ ./  // ./__ .:::. .
  8.                            :_<_____/<______>_:.
  9.                            .                 .
  10.  
  11.                        Damaged Cybernetics Australia
  12.  
  13.       It is a crime to redistribute this document in a commercial
  14.  
  15.       venture of any kind without permission or a licensing agreement.
  16.  
  17.       Contact us via email for more information on licensing.
  18.  
  19.       This is freely distributable for non-commercial use, however we
  20.  
  21.       require that you acknowledge the following:
  22.  
  23.    SNES Kart 1.6 Copyright (c) 1995-1996 DiskDude. All rights reserved.
  24.  
  25.                                   [Image]
  26.  
  27. None of the information contained in this text comes from any confidential
  28. source. It was obtained from various sources on the Internet, but also the
  29. product of my own investigation. Refer to the Acknowledgements section at
  30. the end of this text.
  31.  
  32. Use this information for your own use, I will not take any responsibility
  33. for your actions. All copyrights and trademarks are owned by their
  34. respective owners, even if not acknowledged, no infringements intended.
  35.  
  36. I wrote this because all of this information is scattered in small files
  37. everywhere, if existing at all, most of it outdated. This is an attempt to
  38. conveniently bring all of the information to one place, and as up-to-date
  39. as possible. If you find this useful, tell me! I love positive feedback.
  40.  
  41.                                   Contents
  42.  
  43.  Pin Layouts                            Cheat Device Decoding
  44.  
  45.     * What is the cartridge pin            * Pro Action Replay (hardware)
  46.       layout?                              * Gold Finger (software)
  47.     * What is the ROM pin layout?          * Game Genie (hardware)
  48.     * What is the DSP1 pin layout?         * Converting between CPU
  49.     * What is the MAD-1 and its pin          addresses and ROM addresses
  50.       layout?                              * Easily converting between
  51.     * What is the pin layout of the          codes
  52.       16kbit SRAM most commonly used
  53.       by Nintendo?                      SNES Copiers
  54.  
  55.  Cartridge Addressing Schemes              * What are copiers?
  56.                                            * Super Wild Card (SWC) header
  57.     * LoROM cartridges                       information
  58.     * HiROM cartridges                     * Pro Fighter (FIG) header
  59.                                              format
  60.  Embedded Cartridge Information            * Game Doctor file name format
  61.                                            * Super Wild Card parallel port
  62.     * Game title (21 bytes)                  I/O protocol
  63.     * ROM makeup (1 byte)
  64.     * ROM type (1 byte)                 ROM Protection Schemes
  65.     * ROM size (1 byte)
  66.     * SRAM size (1 byte)                   * SlowROM checks
  67.     * Country (1 byte)                     * PAL/NTSC checks
  68.     * License (1 byte)                     * SRAM size checks
  69.     * Game Version (1 byte)
  70.     * Inverse ROM Checksum (2 bytes)    IPS Patch Format
  71.     * ROM Checksum (2 bytes)
  72.     * Non Maskable Interrupt / VBL      Acknowledgements
  73.       Vector (2 bytes)
  74.     * Reset Vector (2 bytes)
  75.     * How do I know if the ROM is
  76.       HiROM or LoROM?
  77.  
  78.                                 Pin Layouts
  79.  
  80. What is the cartridge pin layout?
  81.  
  82. If the SNES doesn't detect the CIC while power is on, then it will not
  83. continue to read the cartridge. Further details of this are not known to
  84. me.
  85.  
  86.                Super FX   01   32
  87.  
  88.                           02   33
  89.  
  90.                           03   34
  91.  
  92.                           04   35
  93.  
  94.                     GND   05   36   GND
  95.  
  96. F                   A11   06   37   A12
  97.  
  98. r                   A10   07   38   A13
  99.  
  100. o                    A9   08   39   A14
  101.  
  102. n                    A8   09   40   A15
  103.  
  104. t                    A7   10   41   BA0
  105.  
  106.                      A6   11   42   BA1
  107.  
  108. o                    A5   12   43   BA2
  109.  
  110. f                    A4   13   44   BA3
  111.  
  112.                      A3   14   45   BA4
  113.  
  114. c                    A2   15   46   BA5
  115.  
  116. a                    A1   16   47   BA6
  117.  
  118. r                    A0   17   48   BA7
  119.  
  120. t                  /IRQ   18   49   /CS
  121.  
  122.                      D0   19   50   D4
  123.  
  124.                      D1   20   51   D5
  125.  
  126.                      D2   21   52   D6
  127.  
  128.                      D3   22   53   D7
  129.  
  130.                     /RD   23   54   /WR
  131.  
  132.       CIC out data (p1)   24   55   CIC out data (p2)
  133.  
  134.        CIC in data (p7)   25   56   CIC in clock (p6)
  135.  
  136.                   RESET   26   57   nc
  137.  
  138.                     Vcc   27   58   Vcc
  139.  
  140.                           28   59
  141.  
  142.                           29   60
  143.  
  144.                           30   61
  145.  
  146.              Left audio   31   62   Right audio
  147.  
  148. LoROM:    32kbyte pages/banks (A15 not used - assumed high)
  149.  
  150. HiROM:    64kbyte pages/banks
  151.  
  152. BA0-BA7 switch between a possible 256 banks/pages.
  153.  
  154. LoROM data is stored in the upper 32kbytes of the possible 64kbyte
  155. bank/page (A15 is assumed high). Using 64kbyte pages, the SNES can address
  156. a huge 16Mbytes or 128Mbits!
  157.  
  158. According to a SNES memory map, LoROM games can be as large as 16Mbit while
  159. HiROM games are limited to 32Mbit... what about the 48Mbit game floating
  160. around?
  161.  
  162. What is the ROM pin layout?
  163.  
  164. This pin layout was taken from a Donkey Kong Country 2 cartridge and seems
  165. to be consistent with all their mask ROMs (some are 32pin, others 36pin).
  166.  
  167.                A20             Vcc
  168.  
  169.                A21             A22
  170.  
  171.                A17   01   32   Vcc
  172.  
  173.                A18   02   31   /OE
  174.  
  175.                A15   03   30   A19
  176.  
  177.                A12   04   29   A14
  178.  
  179.                 A7   05   28   A13
  180.  
  181.                 A6   06   27   A8
  182.  
  183.                 A5   07   26   A9
  184.  
  185.                 A4   08   25   A11
  186.  
  187.                 A3   09   24   A16
  188.  
  189.                 A2   10   23   A10
  190.  
  191.                 A1   11   22   /CS
  192.  
  193.                 A0   12   21   D7
  194.  
  195.                 D0   13   20   D6
  196.  
  197.                 D1   14   19   D5
  198.  
  199.                 D2   16   18   D4
  200.  
  201.                Vss   16   17   D3
  202.  
  203. What is the DSP1 pin layout?
  204.  
  205. This was taken from a hacked Pilotwings cartridge with a switch on it -
  206. possibly to select between HiROM and LoROM DSP1 games. I'm not 100% sure
  207. that the following is correct or complete though.
  208.  
  209.                Vcc   01   28   Vcc
  210.  
  211.                Vcc   02   27   A14 (A12 - used for HiROM?)
  212.  
  213.                 nc   03   26   /CS
  214.  
  215.                 nc   04   25   /RD
  216.  
  217.                 nc   05   24   /WR
  218.  
  219.                 D0   06   23   ?
  220.  
  221.                 D1   07   22   ?
  222.  
  223.                 D2   08   21   Vcc
  224.  
  225.                 D3   09   20   Vcc
  226.  
  227.                 D4   10   19   Vcc
  228.  
  229.                 D5   11   18   Vcc
  230.  
  231.                 D6   12   17   GND
  232.  
  233.                 D7   13   16   /RESET (inverted RESET- SNES slot)
  234.  
  235.                 D8   14   15   CLOCK?
  236.  
  237. If you can verify/correct this, it would be greatly appreciated.
  238.  
  239. What is the MAD-1 and its pin layout?
  240.  
  241. The MAD-1 stands for Memory Address Decoder revision 1. It is used on the
  242. Donkey Kong Country (1 and 2) cartridge and possibly other cartridges in
  243. order to address one or two ROMs and a static RAM.
  244.  
  245.                /HI   01   16   /LO
  246.  
  247.                /SE   02   15   A13
  248.  
  249.                      03   14   A14
  250.  
  251.                /RE   04   13   BA5
  252.  
  253.                Vcc   05   12   A15
  254.  
  255.                Vcc   06   11   /CS (p49 SNES slot)
  256.  
  257.                Vcc   07   10   Vcc
  258.  
  259.                GND   08   09   RESET (p26 SNES slot)
  260.  
  261. /RE - /CS on a 32Mbit ROM (possibly for MAD-1a only)
  262.  
  263. /LO - /CS on ROM1 (lower 16mbit)
  264.  
  265. /HI - /CS on ROM2 (upper 16mbit)
  266.  
  267. /SE - /CS on Static RAM
  268.  
  269. What is the pin layout of the 16kbit SRAM most commonly used by Nintendo?
  270.  
  271. It seems that Nintendo uses this SRAM in many of their games, mainly
  272. because it is very cheap, only $A5 (retail) - much cheaper for Nintendo who
  273. buys millions of them. It can address up to 2048 bytes or 16kbits.
  274.  
  275.                 A7   01   24   Vcc
  276.  
  277.                 A6   02   23   A8
  278.  
  279.                 A5   03   22   A9
  280.  
  281.                 A4   04   21   /WE
  282.  
  283.                 A3   05   20   /OE
  284.  
  285.                 A2   06   19   A10
  286.  
  287.                 A1   07   18   /CS
  288.  
  289.                 A0   08   17   D7
  290.  
  291.                 D0   09   16   D6
  292.  
  293.                 D1   10   15   D5
  294.  
  295.                 D2   11   14   D4
  296.  
  297.                Vss   12   13   D3
  298.  
  299.                         Cartridge Addressing Schemes
  300.  
  301.     LoROM cartridges:                HiROM cartridges:
  302.  
  303.     read ROM   /RD, /CS, RESET low   read ROM   /CS, /RD, RESET low
  304.  
  305.                /WR high                         /WR high
  306.  
  307.     read SRAM  /CS, /RD low          read SRAM  /RD low
  308.  
  309.                RESET, /WR high                  RESET, /WR, /CS high
  310.  
  311.                A15, BA4, BA5 high               A13, A14, BA5 high
  312.  
  313.     write SRAM /CS, /WR low          write SRAM /WR low
  314.  
  315.                RESET, /RD high                  RESET, /RD, /CS high
  316.  
  317.                A15, BA4, BA5 high               A13, A14, BA5 high
  318.  
  319. Would anyone like to verify this?
  320.  
  321.                        Embedded Cartridge Information
  322.  
  323. Most of the information in this section was obtained from Mindrape's SNES
  324. ROM, available from http://www.futureone.com/~damaged/.
  325.  
  326. All values are in decimal unless specified with a trailing 'h'.
  327.  
  328. The starting offset for this information is located at the end of the first
  329. page:
  330.  
  331. LoROM: offset 32704
  332.  
  333. HiROM: offset 65472
  334.  
  335. Game title (21 bytes)
  336.  
  337. The title is in upper case on most games.
  338.  
  339. ROM makeup (1 byte)
  340.  
  341. Upper nibble (4 bits):
  342.  
  343. Value ROM speed
  344.  
  345.   0   SlowROM (200ns)
  346.  
  347.   3   FastROM (120ns)
  348.  
  349. Lower nibble (4 bits):
  350.  
  351. Value Bank size
  352.  
  353.   0   LoROM (32kb banks)
  354.  
  355.   1   HiROM (64kb banks)
  356.  
  357. ROM type (1 byte)
  358.  
  359. Byte ROM type
  360.  
  361.  0   ROM only
  362.  
  363.  1   ROM and RAM
  364.  
  365.  2   ROM and Save RAM
  366.  
  367.  3   ROM and DSP1 chip
  368.  
  369.  4   ROM, RAM and DSP1 chip
  370.  
  371.  5   ROM, Save RAM and DSP1 chip
  372.  
  373.  19  ROM and Super FX chip
  374.  
  375. 227  ROM, RAM and GameBoy data
  376.  
  377. 246  ROM and DSP2 chip
  378.  
  379. ROM size (1 byte)
  380.  
  381. Byte ROM size
  382.  
  383.  8    2 MegaBits
  384.  
  385.  9    4 MegaBits
  386.  
  387.  10   8 MegaBits
  388.  
  389.  11  16 MegaBits
  390.  
  391.  12  32 MegaBits
  392.  
  393. At the time of writing, the largest SNES game is 48Mbit, while 8Mbit
  394. cartridges are the most common. There are cartridge sizes of 10Mbit,
  395. 12Mbit, 20Mbit and 24Mbit, which are reported as 16Mbit, 16Mbit, 16Mbit and
  396. 32Mbit respectively.
  397.  
  398. Another way of calculating the ROM size is: 1 shl (ROMbyte-7) MegaBits
  399.  
  400. SRAM size (1 byte)
  401.  
  402. Byte SRAM size
  403.  
  404.  0   (none)
  405.  
  406.  1   16 KiloBits
  407.  
  408.  2   32 KiloBits
  409.  
  410.  3   64 KiloBits
  411.  
  412. 64 KiloBit SRAM's are the largest Nintendo uses (except DOOM?), while most
  413. copiers have 256 kiloBits on-board.
  414.  
  415. Another way of calculating the SRAM size is: 1 shl (SRAMbyte+3) KiloBits
  416.  
  417. Country (1 byte)
  418.  
  419. Byte Country                               Video system
  420.  
  421.  0   Japan                                 NTSC
  422.  
  423.  1   USA                                   NTSC
  424.  
  425.  2   Australia, Europe, Oceania and Asia   PAL
  426.  
  427.  3   Sweden                                PAL
  428.  
  429.  4   Finland                               PAL
  430.  
  431.  5   Denmark                               PAL
  432.  
  433.  6   France                                PAL
  434.  
  435.  7   Holland                               PAL
  436.  
  437.  8   Spain                                 PAL
  438.  
  439.  9   Germany, Austria and Switzerland      PAL
  440.  
  441.  10  Italy                                 PAL
  442.  
  443.  11  Hong Kong and China                   PAL
  444.  
  445.  12  Indonesia                             PAL
  446.  
  447.  13  Korea                                 PAL
  448.  
  449. License (1 byte)
  450.  
  451.  Byte Company                             Byte Company
  452.  
  453.   1   Nintendo                            131  Lozc
  454.  
  455.   3   Imagineer-Zoom                      132  Koei
  456.  
  457.   5   Zamuse                              134  Tokuma Shoten Intermedia
  458.  
  459.   6   Falcom                              136  DATAM-Polystar
  460.  
  461.   8   Capcom                              139  Bullet-Proof Software
  462.  
  463.   9   HOT-B                               140  Vic Tokai
  464.  
  465.   10  Jaleco                              142  Character Soft
  466.  
  467.   11  Coconuts                            143  I''Max
  468.  
  469.   12  Rage Software                       144  Takara
  470.  
  471.   14  Technos                             145  CHUN Soft
  472.  
  473.   15  Mebio Software                      146  Video System Co., Ltd.
  474.  
  475.   18  Gremlin Graphics                    147  BEC
  476.  
  477.   19  Electronic Arts                     149  Varie
  478.  
  479.   21  COBRA Team                          151  Kaneco
  480.  
  481.   22  Human/Field                         153  Pack in Video
  482.  
  483.   23  KOEI                                154  Nichibutsu
  484.  
  485.   24  Hudson Soft                         155  TECMO
  486.  
  487.   26  Yanoman                             156  Imagineer Co.
  488.  
  489.   28  Tecmo                               160  Telenet
  490.  
  491.   30  Open System                         164  Konami
  492.  
  493.   31  Virgin Games                        165  K.Amusement Leasing Co.
  494.  
  495.   32  KSS                                 167  Takara
  496.  
  497.   33  Sunsoft                             169  Technos Jap.
  498.  
  499.   34  POW                                 170  JVC
  500.  
  501.   35  Micro World                         172  Toei Animation
  502.  
  503.   38  Enix                                173  Toho
  504.  
  505.   39  Loriciel/Electro Brain              175  Namco Ltd.
  506.  
  507.   40  Kemco                               177  ASCII Co. Activison
  508.  
  509.   41  Seta Co.,Ltd.                       178  BanDai America
  510.  
  511.   45  Visit Co.,Ltd.                      180  Enix
  512.  
  513.   49  Carrozzeria                         182  Halken
  514.  
  515.   50  Dynamic                             186  Culture Brain
  516.  
  517.   51  Nintendo                            187  Sunsoft
  518.  
  519.   52  Magifact                            188  Toshiba EMI
  520.  
  521.   53  Hect                                189  Sony Imagesoft
  522.  
  523.   60  Empire Software                     191  Sammy
  524.  
  525.   61  Loriciel                            192  Taito
  526.  
  527.   64  Seika Corp.                         194  Kemco
  528.  
  529.   65  UBI Soft                            195  Square
  530.  
  531.   70  System 3                            196  Tokuma Soft
  532.  
  533.   71  Spectrum Holobyte                   197  Data East
  534.  
  535.   73  Irem                                198  Tonkin House
  536.  
  537.   75  Raya Systems/Sculptured Software    200  KOEI
  538.  
  539.   76  Renovation Products                 202  Konami USA
  540.  
  541.   77  Malibu Games/Black Pearl            203  NTVIC
  542.  
  543.   79  U.S. Gold                           205  Meldac
  544.  
  545.   80  Absolute Entertainment              206  Pony Canyon
  546.  
  547.   81  Acclaim                             207  Sotsu Agency/Sunrise
  548.  
  549.   82  Activision                          208  Disco/Taito
  550.  
  551.   83  American Sammy                      209  Sofel
  552.  
  553.   84  GameTek                             210  Quest Corp.
  554.  
  555.   85  Hi Tech Expressions                 211  Sigma
  556.  
  557.   86  LJN Toys                            214  Naxat
  558.  
  559.   90  Mindscape                           216  Capcom Co., Ltd.
  560.  
  561.   93  Tradewest                           217  Banpresto
  562.  
  563.   95  American Softworks Corp.            218  Tomy
  564.  
  565.   96  Titus                               219  Acclaim
  566.  
  567.   97  Virgin Interactive Entertainment    221  NCS
  568.  
  569.   98  Maxis                               222  Human Entertainment
  570.  
  571.  103  Ocean                               223  Altron
  572.  
  573.  105  Electronic Arts                     224  Jaleco
  574.  
  575.  107  Laser Beam                          226  Yutaka
  576.  
  577.  110  Elite                               228  T&ESoft
  578.  
  579.  111  Electro Brain                       229  EPOCH Co.,Ltd.
  580.  
  581.  112  Infogrames                          231  Athena
  582.  
  583.  113  Interplay                           232  Asmik
  584.  
  585.  114  LucasArts                           233  Natsume
  586.  
  587.  115  Parker Brothers                     234  King Records
  588.  
  589.  117  STORM                               235  Atlus
  590.  
  591.  120  THQ Software                        236  Sony Music Entertainment
  592.  
  593.  121  Accolade Inc.                       238  IGS
  594.  
  595.  122  Triffix Entertainment               241  Motown Software
  596.  
  597.  124  Microprose                          242  Left Field Entertainment
  598.  
  599.  127  Kemco                               243  Beam Software
  600.  
  601.  128  Misawa                              244  Tec Magik
  602.  
  603.  129  Teichio                             249  Cybersoft
  604.  
  605.  130  Namco Ltd.                          255  Hudson Soft
  606.  
  607. Game Version (1 byte)
  608.  
  609. The version is stored as version 1.VersionByte and must be less than 128.
  610. i.e. Less than 1.128.
  611.  
  612. Inverse ROM Checksum (2 bytes)
  613.  
  614. This is the same as XORing the two checksum bytes. i.e. The checksum bits
  615. are inversed.
  616.  
  617. ROM Checksum (2 bytes)
  618.  
  619. The checksum is a 16bit word with the lower 8bits stored first, followed by
  620. the upper 8bits.
  621.  
  622. The checksum is calculated by dividing the ROM into 4Mbit chunks then
  623. adding all the bytes in these chunks together. Once you have the checksum
  624. for each chunk, add them together and take the lower 32bits of the result.
  625.  
  626. With a non-standard image size, you do not get it equally divisible by
  627. 4Mbit (excluding 2Mbit images). e.g. 10Mbit = 4Mbit + 4Mbit + 2Mbit chunks.
  628.  
  629. Therefore, you must create a 4Mbit chunk from what is left over. Using the
  630. same example, you would add the checksum of the following chunks to get the
  631. ROM checksum:
  632.  
  633.                       4Mbit + 4Mbit + (2Mbit + 2Mbit)
  634.                                      or
  635.                         4Mbit + 4Mbit + (2 x 2Mbit)
  636.  
  637. Non Maskable Interrupt / VBL Vector (2 bytes)
  638.  
  639. LoROM: at offset 33274
  640.  
  641. HiROM: at offset 66042
  642.  
  643. Reset Vector (2 bytes)
  644.  
  645. Where to start the ROM code.
  646.  
  647. LoROM: at offset 33276
  648.  
  649. HiROM: at offset 66042 [correction by Qwertie: 66044?]
  650.  
  651. How do I know if the ROM is HiROM or LoROM?
  652.  
  653. When you OR the checksum bytes of a disk image and the inverse checksum
  654. bytes, the result should be FFFF hex. Therefore, to detect whether an image
  655. is HiROM or LoROM, you must read those bytes, OR them, and see if they
  656. equal FFFF hex.
  657.  
  658. The ROM's type depends at which location the OR'd bytes equal FFFF hex. If
  659. it isn't found at either location, then the other way of checking is to see
  660. at which location the title contains uppercase alphanumeric characters.
  661. (But this fails with most Japanese cartridges)
  662.  
  663. Why don't you use the ROM Makeup Byte? You can, and some utilities do, but
  664. some utilities allow you to change this byte, so incorrect results may
  665. occur.
  666.  
  667. For the actual ROM, the embedded cartridge information is stored at the
  668. same position for both LoROM and HiROM. In this case, you must use the ROM
  669. Makeup Byte or read a 64kb page and see if both 32kb chunks (upper and
  670. lower 32kb) are the same. If they are the same, it is LoROM (32kb pages -
  671. A15 is not used, the data repeats itself) otherwise it is HiROM.
  672.  
  673. As a general rule of thumb, if you can't detect which ROM type it is,
  674. default to LoROM, as these are the most common of cartridges.
  675.  
  676.                            Cheat Device Decoding
  677.  
  678. We'll start with the easiest first then work our way down. These codes work
  679. by replacing a byte at a specific location in the ROM.
  680.  
  681. E.g. In the game F-Zero, at a particular position in the ROM, there is a
  682. number 3 indicating 3 lives to start off with. What a cheat code will do is
  683. replace this byte with, let's say, the number 9, so now when the game is
  684. run, the player starts off with 9 lives.
  685.  
  686. Pro Action Replay (hardware)
  687.  
  688. Code format:        AAAAAADD            (8 digits)
  689.  
  690. A - Address
  691.  
  692. D - Data
  693.  
  694. These codes are in Hex, the address being a CPU address, not a direct ROM
  695. location (more about this later).
  696.  
  697. Gold Finger (software)
  698.  
  699. Code format:        AAAAADDDDDDCCW      (14 digits)
  700.  
  701. A - Address
  702.  
  703. D - Data
  704.  
  705. C - Checksum
  706.  
  707. W - What to change (DRAM or SRAM)
  708.  
  709. This code was designed for the copiers, and are straight Hex characters.
  710. Therefore the Address is a ROM address, not a CPU address. Data bytes are
  711. arranged in 2 characters (2 D's per byte), which allows for 3 bytes. If a
  712. byte is not being used, it is denoted by 'XX'. I have never seen a code
  713. with three unused bytes - what's the point of one anyhow?
  714.  
  715. The address (A's) is a base address. The first data byte (D's) is to be
  716. placed at this address. The second at address+1, the third at address+2 (if
  717. to be used, that is, if they are not 'XX').
  718.  
  719. To calculate the checksum you must take the A's and D's, add a zero (0) to
  720. the front of the shortened code, then divide into block's of 2 hex digits
  721. (bytes). Add these hex digits together (2 characters per hex digit) then
  722. minus 160 hex (352 decimal). Now AND this number by FF hex (255 decimal) to
  723. get the lower 8 bits (byte). Convert this number to hex and you have your
  724. checksum (C's).
  725.  
  726. W tells the copier whether to replace the byte in the DRAM (ROM image) or
  727. the SRAM (Saved game static RAM) of the copier.
  728.  
  729. Value of W  Where to place byte
  730.  
  731.     0       DRAM (ROM image)
  732.  
  733.     1       SRAM (Saved game image)
  734.  
  735. The rec.games.video FAQ specifies that there may be non- standard values of
  736. 2, 8, A, C, F for W, which may be converted to 0. I personally have only
  737. seen Gold Finger codes with W = 0.
  738.  
  739. Game Genie (hardware)
  740.  
  741. Code format:        DDAA-AAAA      (8 digits)
  742.  
  743. A - Address
  744.  
  745. D - Data
  746.  
  747. This is the most difficult code to decipher out of the lot. It is as
  748. follows:
  749.  
  750. First take the code in the form xxxx-xxxx and take out the dash ('-') to
  751. form xxxxxxxx. Convert these characters (Genie Hex) to normal hex
  752. characters using the following table:
  753.  
  754. Genie Hex:    D  F  4  7  0  9  1  5  6  B  C  8  A  2  3  E
  755.  
  756. Normal  Hex:  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  757.  
  758. The first two characters is the data byte in Hex. Now take the other 6
  759. following characters (encoded address) and put it into it's binary form of
  760. 24 bits.
  761.  
  762. Now take each bit of the encoded address and rearrange to form the real
  763. address:
  764.  
  765. 24bit encoded address: ijklqrst opabcduv wxefghmn
  766.  
  767. 8bit encoded data:     ABCDEFGH
  768.  
  769. Rearrange as:
  770.  
  771. 24bit address             : 8bit data
  772.  
  773. abcdefgh ijklmnop qrstuvwx: ABCDEFGH
  774.  
  775. MSB                    LSB  MSB  LSB
  776.  
  777. Bit 23 of the encoded address (bit 15 of the real address) is always 1. The
  778. reason being that the SNES CPU address must be 1 for it to access the ROM.
  779.  
  780. Converting between CPU addresses and ROM addresses
  781.  
  782. This is very easy once you understand how it is done. To convert from a CPU
  783. address to a ROM address, all you need to do is remove bit 15. By doing
  784. this, I don't mean just setting it to 0. I mean by removing it, then moving
  785. all bits after it down one.
  786.  
  787. e.g. ROMaddress = (CPUaddress and 7FFFh) or ((CPUaddress and FF0000h) shl 1)
  788.  
  789. Therefore, to convert from a ROM address to a CPU address, you must insert
  790. a high bit into position 15 (bit 15).
  791.  
  792. e.g. CPUaddress = (ROMaddress and 7FFFh) or ((ROMaddress and 7F8000h) shr 1) or 8000h
  793.  
  794. Easily converting between codes
  795.  
  796. I have made available two DOS programs with source code on my WWW pages
  797. which allow you to convert between Game Genie and Gold Finger codes. These
  798. are available freely from http://www.parodius.com/~diskdude/CartDisk/.
  799.  
  800. Note: Because the Gold Finger can only address upto 8Mbit of game data,
  801. while other codes can address upto 64Mbit of game data, some Game Genie and
  802. Action Replay codes may not be converted to Gold Finger.
  803.  
  804.                                 SNES Copiers
  805.  
  806. What are copiers?
  807.  
  808. A copier is a device which sits on top of the SNES and allows you to backup
  809. your cartridges as well as play your backed up games. It does this by
  810. storing the ROM image of a cartridge to floppy disks via a 1.44Mb disk
  811. drive. Most copiers also include a parallel PC port interface, allowing
  812. your PC to control the unit and store images on your hard drive.
  813.  
  814. Copier's contain DRAM from 1 Megabyte to 16 Megabytes, 8MegaBits to
  815. 128MegaBits respectively. This is the reason why they are so expensive.
  816.  
  817. It is legal to own and use a copier for your own personal backup of
  818. cartridges which you legally own in this point in time, although it is
  819. illegal to distribute this copy (only one copy is allowed). This may vary
  820. depending on where you live.
  821.  
  822. If you wish to make your own "home brew" copier for the SNES, and other
  823. consoles, more information can be found at
  824. http://www.parodius.com/~diskdude/CartDisk/.
  825.  
  826. Super Wild Card (SWC) header information
  827.  
  828. The SWC (Super Wild Card) image format consists of a 512 byte header. It's
  829. layout is as follows (set unused bytes to 00h):
  830.  
  831. Offset Function
  832.  
  833.   0    Lower 8 bits of size word
  834.  
  835.   1    Upper 8 bits of size word
  836.  
  837.   2    Image information byte
  838.  
  839.   8    SWC header identifier (set to AAh)
  840.  
  841.   9    SWC header identifier (set to BBh)
  842.  
  843.  10    SWC header identifier (set to 04h)
  844.  
  845. The size word is calculated by multiplying the image size, not game size
  846. (in MegaBits) by 16. e.g. Image is 4 Mbits, so size word would be 4*16=64.
  847.  
  848. Image information byte (in the form of 76543210):
  849.  
  850. Bit  Description
  851.  
  852. 7    1 - Run program in Mode 0 (JMP $8000)
  853.  
  854.      0 - Run program in Mode 1 (JMP RESET Vector)
  855.  
  856. 6    1 - Multi image (there is another split file to follow)
  857.  
  858.      0 - Not multi image (no more split files to follow)
  859.  
  860. 5    1 - SRAM memory mapping Mode 21 (HiROM)
  861.  
  862.      0 - SRAM memory mapping Mode 20
  863.  
  864. 4    1 - DRAM memory mapping Mode 21 (HiROM)
  865.  
  866.      0 - DRAM memory mapping Mode 20
  867.  
  868. 3/2  00: 256kbit SRAM
  869.  
  870.      01: 65kbit SRAM
  871.  
  872.      10: 16kbit SRAM
  873.  
  874.      11: no SRAM
  875.  
  876. 1/0  reserved
  877.  
  878. Pro Fighter (FIG) header format
  879.  
  880. This format is similar to the SWC. It consists of a 512byte header who's
  881. layout is as follows (set unused bytes to 00h):
  882.  
  883. Offset Function
  884.  
  885.   0    Lower 8 bits of size word
  886.  
  887.   1    Upper 8 bits of size word
  888.  
  889.   2    40h - Multi image
  890.  
  891.        00h - Last image in set (or single image)
  892.  
  893.   3    80h - if HiROM
  894.  
  895.        00h - if LoROM
  896.  
  897.   4    If using DSP1 microchip:
  898.  
  899.            FDh - If using SRAM (SRAM size>0)
  900.  
  901.            47h - If no SRAM (SRAM size=0)
  902.  
  903.        77h - If not using DSP1 and no SRAM (SRAM size=0)
  904.  
  905.   5    If using DSP1 microchip:
  906.  
  907.            82h - If using SRAM (SRAM size>0)
  908.  
  909.            83h - If no SRAM (SRAM size=0)
  910.  
  911.        83h - If not using DSP1 and no SRAM (SRAM size=0)
  912.  
  913. Game Doctor file name format
  914.  
  915. The Game Doctor does not use a 512 byte header like the SWC, instead it
  916. uses specially designed filenames to distinguish between multi files. I'm
  917. not sure if it used the filename for information about the size of the
  918. image though.
  919.  
  920. Usually, the filename is in the format of: SFXXYYYZ.078
  921.  
  922. Where SF means Super Famicon, XX refers to the size of the image in Mbit.
  923. If the size is only one character (i.e. 2, 4 or 8 Mbit) then no leading "0"
  924. is inserted.
  925.  
  926. YYY refers to a catalogue number in Hong Kong shops identifying the game
  927. title. (0 is Super Mario World, 1 is F- Zero, etc). I was told that the
  928. Game Doctor copier produces a random number when backing up games.
  929.  
  930. Z indicates a multi file. Like XX, if it isn't used it's ignored.
  931.  
  932. A would indicate the first file, B the second, etc. I am told 078 is not
  933. needed, but is placed on the end of the filename by systems in Asia.
  934.  
  935. e.g. The first 16Mbit file of Donkey Kong Country (assuming it is cat. no.
  936. 475) would look like: SF16475A.078
  937.  
  938. Super Wild Card parallel port I/O protocol
  939.  
  940. I was given this information a while ago. It is supposed to be direct from
  941. the company which makes SWC's and I have included this information because
  942. a few people have been asking for it. If you have similar information for
  943. other backup devices, it would be appreciated if you could send it to me.
  944.  
  945.       [PROTOCOL USED IN PC]
  946.  
  947.       * BYTE OUTPUT PROCEDURE
  948.  
  949.           WAIT BUSY BIT = 1           STATUS PORT BIT7   (HEX n79, n7D)
  950.  
  951.           WRITE ONE BYTE              DATA LATCH         (HEX n78, n7C)
  952.  
  953.           REVERSE STROBE BIT          CONTROL PORT BIT0  (HEX n7A, n7E)
  954.  
  955.       * BYTE INPUT PROCEDURE
  956.  
  957.           WAIT BUSY BIT = 0           STATUS PORT BIT7   (HEX n79, n7D)
  958.  
  959.           READ LOW 4 BITS OF BYTE     STATUS PORT BIT3-6 (HEX n79, n7D)
  960.  
  961.           REVERSE STROBE BIT          CONTROL PORT BIT0  (HEX n7A, n7E)
  962.  
  963.           WAIT BUSY BIT = 0           STATUS PORT BIT7   (HEX n79, n7D)
  964.  
  965.           READ HIGH 4 BITS OF BYTE    STATUS PORT BIT3-6 (HEX n79, n7D)
  966.  
  967.           REVERSE STROBE BIT          CONTROL PORT BIT0  (HEX n7A, n7E)
  968.  
  969.       * 5 TYPES OF COMMAND
  970.  
  971.       * COMMAND LENGTH = 9 BYTES.
  972.  
  973.       * COMMAND FORMAT
  974.  
  975.         BYTE 1   D5               ID CODE 1
  976.  
  977.         BYTE 2   AA               ID CODE 2
  978.  
  979.         BYTE 3   96               ID CODE 3
  980.  
  981.         BYTE 4   00|01|04|05|06   COMMAND CODE
  982.  
  983.         BYTE 5   al               LOW BYTE OF ADDRESS
  984.  
  985.         BYTE 6   ah               HIGH BYTE OF ADDRESS
  986.  
  987.         BYTE 7   ll               LOW BYTE OF DATA LENGTH
  988.  
  989.         BYTE 8   lh               HIGH BYTE OF DATA LENGTH
  990.  
  991.         BYTE 9   cc               CHECKSUM = 81^BYTE4^BYTE5^BYTE6^BYTE7^BYTE8
  992.  
  993.       * COMMAND [00] : DOWNLOAD DATA
  994.  
  995.         al, ah = ADDRESS
  996.  
  997.         ll, lh = DATA LENGTH
  998.  
  999.         OUTPUT DATAS AFTER COMMAND
  1000.  
  1001.       * COMMAND [01] : UPLOAD DATA
  1002.  
  1003.         al, ah = ADDRESS
  1004.  
  1005.         ll, lh = DATA LENGTH
  1006.  
  1007.         INPUT DATAS AFTER COMMAND
  1008.  
  1009.       * COMMAND [04] : FORCE SFC PROGRAM TO JMP
  1010.  
  1011.         al, ah = ADDRESS
  1012.  
  1013.       * COMMAND [05] : SET MEMORY PAGE NUMBER
  1014.  
  1015.         al BIT0-1 = PAGE NUMBER
  1016.  
  1017.         al BIT2-7 + ah BIT0-1 = BANK NUMBER
  1018.  
  1019.       * COMMAND [06] : SUB FUNCTION
  1020.  
  1021.         al = 0  INITIAL DEVICE
  1022.  
  1023.         al = 1  PLAY GAME IN DRAM
  1024.  
  1025.         al = 2  PLAY CARTRIDGE
  1026.  
  1027.                            ROM Protection Schemes
  1028.  
  1029. This section details ways of bypassing the FastROM, PAL/NTSC and SRAM size
  1030. checks implemented in many SNES games in order to stop people backing them
  1031. up using copiers.
  1032.  
  1033. Note: You don't necessarily have to find and replace all strings to remove
  1034. the check(s).
  1035.  
  1036. SlowROM checks
  1037.  
  1038. Most cartridges these days use 120ns ROM in order to get the most out of
  1039. the ageing SNES. However, there are still many copiers around which emulate
  1040. ROM at speeds of 200ns meaning they cannot backup the newer cartridges
  1041. correctly.
  1042.  
  1043. Changing the ROM code to bypass the SlowROM check, found in many, but not
  1044. all FastROM games, allows many people with SlowROM copiers to backup
  1045. FastROM games.
  1046.  
  1047. To patch a ROM and bypass the SlowROM check, you must find any of the
  1048. following strings in the image and replace it with the patch string: (all
  1049. codes in hex)
  1050.  
  1051. Search for          Replace with
  1052.  
  1053. A9 01 8D 0D 42      A9 00 8D 0D 42
  1054.  
  1055. A9 01 8E 0D 42      A9 00 8E 0D 42
  1056.  
  1057. A2 01 8D 0D 42      A2 00 8D 0D 42
  1058.  
  1059. A2 01 8E 0D 42      A2 00 8E 0D 42
  1060.  
  1061. A9 01 00 8D 0D 42   A9 00 00 8D 0D 42
  1062.  
  1063. A9 01 8F 0D 42 00   A9 00 8F 0D 42 00
  1064.  
  1065. PAL/NTSC checks
  1066.  
  1067. Most SNES games have code which detects which video system the cartridge is
  1068. being played on and refuses to run if not in the right mode. This is to
  1069. stop people from buying games from other countries before they are released
  1070. locally.
  1071.  
  1072. To bypass the PAL/NTSC check the following patterns must be found and
  1073. replaced with the ones specified: (all codes in hex)
  1074.  
  1075. Search for                Replace with
  1076.  
  1077. 3F 21 29 10 C9 10 F0      3F 21 29 10 C9 10 80
  1078.  
  1079. 3F 21 89 10 C9 10 F0      3F 21 89 10 C9 10 80
  1080.  
  1081. 3F 21 29 10 F0            3F 21 29 10 80
  1082.  
  1083. 3F 21 00 89 10 F0         3F 21 00 89 10 80
  1084.  
  1085. 3F 21 00 29 10 F0         3F 21 00 29 10 80
  1086.  
  1087. 3F 21 89 10 00 F0         3F 21 89 10 00 80
  1088.  
  1089. 3F 21 29 10 00 F0         3F 21 29 10 00 80
  1090.  
  1091. AD 3F 21 29 10 00 D0      AD 3F 21 29 10 00 80
  1092.  
  1093. AF 3F 21 00 29 10 D0      AF 3F 21 00 29 10 80
  1094.  
  1095. AF 3F 21 00 29 10 00 D0   AF 3F 21 00 29 10 00 EA EA
  1096.  
  1097. AD 3F 21 29 10 D0         AD 3F 21 29 10 EA EA
  1098.  
  1099. AD 3F 21 29 10 F0         AD 3F 21 29 10 80
  1100.  
  1101. AD 3F 21 89 10 D0         AD 3F 21 89 10 80
  1102.  
  1103. AD 3F 21 29 10 C9 00 F0   AD 3F 21 29 10 C9 00 80
  1104.  
  1105. AF 3F 21 00 29 10 00 F0   AF 3F 21 00 29 10 00 80
  1106.  
  1107. AF 3F 21 00 89 10 00 F0   AF 3F 21 00 89 10 00 80
  1108.  
  1109. SRAM size checks
  1110.  
  1111. Some SNES games check to see how much SRAM is connected to the SNES as a
  1112. form of copy protection. As most copiers have 256kbits standard, the game
  1113. will know it's running on a backup unit and stop to prevent people copying
  1114. the games. However, the newer copiers get around this detection somehow.
  1115.  
  1116. To disable the SRAM size check in a ROM image, search for the following and
  1117. replace as appropriate.
  1118.  
  1119. Note: All codes are in hex, although 'xx' means anything, while a comma
  1120. means search for either of the two or more (enclosed in brackets).
  1121.  
  1122. Search for     (8F, 9F) xx xx 70 (CF, DF) xx xx 70 D0
  1123.  
  1124. Replace with   (8F, 9F) xx xx 70 (CF, DF) xx xx 70 EA EA (if SRAM size of game = 64kbit)
  1125.  
  1126.                (8F, 9F) xx xx 70 (CF, DF) xx xx 70 80  (if SRAM size of game <> 64kbit)
  1127.  
  1128. Search for     (8F, 9F) xx xx (30, 31, 32, 33) (CF, DF) xx xx (30, 31, 32, 33) D0
  1129.  
  1130. Replace with   (8F, 9F) xx xx (30, 31, 32, 33) (CF, DF) xx xx (30, 31, 32, 33) 80
  1131.  
  1132. Search for     (8F, 9F) xx xx (30, 31, 32, 33) (CF, DF) xx xx (30, 31, 32, 33) F0
  1133.  
  1134. Replace with   (8F, 9F) xx xx (30, 31, 32, 33) (CF, DF) xx xx (30, 31, 32, 33) EA EA
  1135.  
  1136. Search for     (8F, 9F) xx xx (30, 31, 32, 33) AF xx xx (30, 31, 32, 33) C9 xx xx D0
  1137.  
  1138. Replace with   (8F, 9F) xx xx (30, 31, 32, 33) AF xx xx (30, 31, 32, 33) C9 xx xx 80
  1139.  
  1140. Many thanks to Chp for making his uCON v1.41 source publicly available,
  1141. from which these patterns came.
  1142.  
  1143.                               IPS Patch Format
  1144.  
  1145. This patch format is used a lot for patching SNES ROM images. Therefore I
  1146. have included it's format in this text. For a more detailed explanation of
  1147. the IPS format, please visit the Damaged Cybernetics WWW pages
  1148. http://www.futureone.com/~damaged/.
  1149.  
  1150. The format is as follows:
  1151.  
  1152.    Description                    Size
  1153.  
  1154. IPS file identifier            5 bytes (characters PATCH)
  1155.  
  1156. Offset in file to place patch  3 bytes
  1157.  
  1158. Number of bytes in patch       2 bytes (allows 65535 patch bytes)
  1159.  
  1160. Patch byte(s)                  (specified by 'No. of bytes in patch')
  1161.  
  1162.         .                              .
  1163.  
  1164.         .                              .
  1165.  
  1166. Start again, looking           3 bytes (characters EOF)
  1167.  
  1168. for new offset, unless
  1169.  
  1170. and EOF is found.
  1171.  
  1172. Sample IPS file contents with 2 offset points:
  1173.  
  1174. PATCHooonn?ooonn?EOF
  1175.  
  1176. o - Offset in file
  1177.  
  1178. n - Number of bytes in patch
  1179.  
  1180. ? - Data byte(s) (n number of bytes)
  1181.  
  1182.                               Acknowledgements
  1183.  
  1184. The following people have contributed to this text, whether they know it or
  1185. not. Many thanks to them for their wonderful contribution(s).
  1186.  
  1187.  Donald Moore   (moore@futureone.com)
  1188.  Chp            (ronaldm@netcom.com)
  1189.  Thomas Rolfes  (Thomas_Rolfes@ms.maus.de)
  1190.  Jeremy Chadwick(yoshi@parodius.com)
  1191.  Nigel Bryant   (nbb@essex.ac.uk)
  1192.  
  1193. Also used for the creation of this text was the rec.games.video Frequently
  1194. Asked Questions (FAQ) file; a FAQ with a huge amount of information on
  1195. consoles in general.
  1196.  
  1197.                                   [Image]
  1198.  
  1199.                    Special thanks to Mark for the midi!
  1200.                                   [Image]
  1201.  
  1202. Questions, comments or complaints can be sent to DiskDude via e-mail.
  1203. Copyright © 1995-1996 DiskDude of Damaged Cybernetics. All rights reserved.
  1204.  
  1205. Last updated 1st January 1997
  1206.  
  1207. Damaged Cybernetics is not connected or affiliated with any mentioned
  1208. company in any way. The opinions of Damaged Cybernetics do not reflect the
  1209. views of the various companies mentioned here. Companies and all products
  1210. pertaining to that company are trademarks of that company. Please contact
  1211. that company for trademark and copyright information.
  1212.